﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Multicasting
{
    class Program
    {
        public delegate void PrintInfo();

        public static void TestPrint()
        {
            Console.WriteLine("Test test test");
        }

        static void Main(string[] args)
        {
            PrintInfo pd = new PrintInfo(TestPrint);
            pd();
            Cat c = new Cat();
            pd += c.PrintCat;
            
            Console.WriteLine("");
            pd();

            Dog d = new Dog();
            pd += d.PrintDog;

            Console.WriteLine("");
            pd();

            Mouse m = new Mouse();
            pd += m.PrintMouse;
            pd();

            Console.WriteLine("");
            pd -= TestPrint;

            pd();



        }
    }
}
